package month4.day19;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class C3 {
    public static void main(String[] args) {
        long kaishi = System.nanoTime();
        List list = new ArrayList();
        for (int i = 0; i < 1000000; i++) {
            list.add(i);
        }
        for (int i = 0; i < 100; i++) {
            list.remove((int) (Math.random() * 100));
        }
        long jieshu = System.nanoTime();
        System.out.println(jieshu - kaishi);
        System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        long start = System.nanoTime();
        List list1 = new LinkedList();
        for (int i = 0; i < 1000000; i++) {
            list1.add(i);
        }
        for (int i = 0; i < 100; i++) {
            list1.remove((int) (Math.random() * 100));
        }
        long end = System.nanoTime();
        System.out.println(end - start);
    }
}
